-- GENERATED SPELL FOR [Crypt Fiend] --


function spell0_27734(pUnit, Event) --@Crypt Scarabs,n/a--
pUnit:FullCastSpellOnTarget(52496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27734', 2000, 1)
end

function spell1_27734(pUnit, Event) --@Web Explosion,Self--
pUnit:FullCastSpellOnTarget(52491,pUnit)
pUnit:RegisterEvent('Sorts_27734', 4349, 1)
end

function Sorts_27734(pUnit, Event)
local choix_sorts_27734 = math.random(0, 1)
if choix_sorts_27734 == 0 then
pUnit:RegisterEvent('spell0_27734', 1, 1)
end
if choix_sorts_27734 == 1 then
pUnit:RegisterEvent('spell1_27734', 1, 1)
end
end

function mob27734_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27734', math.random(1500, 3000), 1)
end

function mob27734_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27734_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27734_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27734, 1, 'mob27734_Action')
RegisterUnitEvent(27734, 2, 'mob27734_Leave')
RegisterUnitEvent(27734, 3, 'mob27734_Kill')
RegisterUnitEvent(27734, 4, 'mob27734_Die')
